/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!				\file		Settings.cc
				\date		june 2010
				\author		TNick

				\brief		Contains the implementation of settings dialog


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please read ReadMe.txt and Licence.txt in root folder
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    
*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include	"Settings.h"


/*  INCLUDES    ============================================================ */
//
//
//
//
/*  DEFINITIONS    --------------------------------------------------------- */

/*  DEFINITIONS    ========================================================= */
//
//
//
//
/*  DATA    ---------------------------------------------------------------- */


/*  DATA    ================================================================ */
//
//
//
//
/*  FUNCTIONS    ----------------------------------------------------------- */

/* ------------------------------------------------------------------------- */
StgsGui::StgsGui			(QWidget *parent) :
		QDialog(parent)
{

	/* 
	main division is made of 2 horizontal bars :
	- top row for content (tree, properties); it is further subdivided in:
		- left side for tree
		- right side for properties, that may display
			- advanced properties
			- simple properties
	- bottom row for buttons (Ok, Cancel, Advanced)
	*/


	/* main layout */
	QVBoxLayout *main_lay = new QVBoxLayout;
	setLayout(main_lay);

	/* splitter to hold the tree to the left and properties to the left*/
	QSplitter *spl_med = new QSplitter(this);

	/* the tree */
	QStandardItemModel model_E(4, 4, spl_med);
	for (int row = 0; row < 4; ++row) {
			for (int column = 0; column < 4; ++column) {
					QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column));
					model_E.setItem(row, column, item);
				}
		}
	QTreeView* view_E = new QTreeView(spl_med);
	view_E->setModel(&model_E);
	//view_E.setVisible(true);

	/* create OK button */
	QPushButton*	AdvProp = new QPushButton(tr("OK"));
	connect(AdvProp, SIGNAL(clicked()), this, SLOT(close()));

	/* feed them in splitter */
	//spl_med->addWidget(view_E);
	spl_med->addWidget(AdvProp);




	/* layout for bottom buttons*/
	QHBoxLayout *btn_lay = new QHBoxLayout;

	/* create OK button */
	QPushButton*	OkBtn = new QPushButton(tr("OK"));
	OkBtn->setDefault(true);
	connect(OkBtn, SIGNAL(clicked()), this, SLOT(close()));

	/* create Cancel button */
	QPushButton*	CcBtn = new QPushButton(tr("Cancel"));
	connect(CcBtn, SIGNAL(clicked()), this, SLOT(close()));

	/* create Advanced button */
	QPushButton*	AdvBtn = new QPushButton(tr("Advanced"));
	connect(AdvBtn, SIGNAL(clicked()), this, SLOT(close()));

	/* feed them in layout */
	btn_lay->addWidget(AdvBtn,0,Qt::AlignVCenter | Qt::AlignHCenter);
	btn_lay->addStretch(1);
	btn_lay->addWidget(OkBtn,0,Qt::AlignVCenter | Qt::AlignHCenter);
	btn_lay->addWidget(CcBtn,0,Qt::AlignVCenter | Qt::AlignHCenter);


	/* feed in main layout */
	main_lay->addWidget(spl_med, 1);
	main_lay->addLayout(btn_lay, 0);

	//spl_med->setOrientation(Qt::Vertical);
	//prdDks[PRD_DK::CMDOUT]->setWidget(spl_med);
	//
	//
	//tx_out = new QTextEdit();
	//tx_out->setReadOnly(true);
	//spl_med->addWidget(tx_out);
	//tx_cmd = new QTextEdit();
	//spl_med->addWidget(tx_cmd);
	//addDockWidget(Qt::BottomDockWidgetArea, prdDks[PRD_DK::CMDOUT]);
	//prdMnu[PRD_M::VIEW]->addAction(prdDks[PRD_DK::CMDOUT]->toggleViewAction());



}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
StgsGui::~StgsGui			()
{

}
/* ========================================================================= */


/*  FUNCTIONS    =========================================================== */
//
//
//
//
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
